var index = 2; //1开发、2测试、3本地环境、4发布、6生产环境、7k8s环境
var Dev = {}
var Test = {
	//测试
	//"https://test-open.xiaokangjun.com/", 
	loginApi: "https://test-open.yekjx.com",
	groupMemberApi: "https://test-group-member.yekjx.com/",
	MemberApi: "https://test-member-api.yekjx.com/api/", //测试环境
	subscribeApi: "https://test-subscribe-api.yekjx.com",
	FileUrl: "https://cdn-static.yekjx.com/",
	FileUploadUrl: "https://test-static.yekjx.com",
	ShopCartApi:'https://test-ddx-shopcart-api.yekjx.com',
	GoodsApi:'https://test-ddx-goods-api.yekjx.com',
	GoodsApis:'https://test-goods-api.yekjx.com',
	TradeApi:'https://test-ddx-trade-api.yekjx.com',
	ActivityApi:'https://test-ddx-activity-api.yekjx.com',
	imgBaseUrl:'https://test-cdn-static.yekjx.com/',
	wxPayApi:'https://test-pay.yekjx.com',//http://192.168.254.197:8088   https://test-pay.yekjx.com
	specalModalUrl: "https://test-h5.yekjx.com/",
	
}

//生产环境
var Pro = {
	loginApi: "https://open.yekjx.com",
	groupMemberApi: "https://group-member.yekjx.com/",
	MemberApi: "https://member-api.yekjx.com/api/", //测试环境
	subscribeApi: "https://subscribe-api.yekjx.com",
	FileUrl: "https://cdn-static.yekjx.com/",
	FileUploadUrl: "https://static.yekjx.com",
	ShopCartApi:'https://ddx-shopcart-api.yekjx.com',
	GoodsApi:'https://ddx-goods-api.yekjx.com',
	GoodsApis:'https://goods-api.yekjx.com',
	TradeApi:'https://ddx-trade-api.yekjx.com',
	ActivityApi:'https://ddx-activity-api.yekjx.com',
	imgBaseUrl:'https://cdn-static.yekjx.com/',
	wxPayApi:'https://pay.yekjx.com',
	specalModalUrl: "https://cdn-h5.yekjx.com/",
}
var Local = {
	loginApi: "https://dev-open.yekjx.com",
	groupMemberApi: "https://dev-group-member.yekjx.com/",
	MemberApi: "http://dev-member-api.yekjx.com/api/", //测试环境
	FileUrl: "https://cdn-static.yekjx.com/",
	FileUploadUrl: "http://test-static.yekjx.com",
	ShopCartApi:'https://dev-ddx-shopcart-api.yekjx.com',
	GoodsApi:'http://dev-ddx-goods-api.yekjx.com',
	TradeApi:'http://dev-ddx-trade-api.yekjx.com',
	ActivityApi:'https://dev-ddx-activity-api.yekjx.com'
}
var K8S_TEST = {
	//测试

}

const createEnv = (type) => {
	switch (parseInt(type)) {
		case 1:
			return Dev;
			break;
		case 2:
			return Test;
			break;
		case 3:
			return Local;
			break;
		case 4:
			return Rel;
			break;
		case 5:
			return View;
			break;
		case 6:
			return Pro;
			break;
		case 7:
			return K8S_TEST;
			break;
		default:
			return Dev;
			break;
	}
};
var env = createEnv(index);
export default function changeEnv(num) {
	env = createEnv(num);
}
export {
	env
}
